package org.jeecg.modules.nurse_user.vo;

import java.util.Collections;
import java.util.List;

import org.jeecg.modules.nurse_home_addr.entity.NurseHomeAddr;
import org.jeecg.modules.nurse_user.entity.NurseUserFamily;
import org.jeecg.modules.nurse_user.entity.NurseUserAddr;
import lombok.Data;
import org.jeecg.modules.nurse_user.entity.NurseUserSpecial;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecgframework.poi.excel.annotation.ExcelCollection;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * @Description: 用户管理
 * @Author: jeecg-boot
 * @Date: 2024-05-20
 * @Version: V1.0
 */
@Data
@ApiModel(value = "nurse_userPage对象", description = "用户管理")
public class NurseUserPage {

    /**
     * id
     */
    @ApiModelProperty(value = "id")
    private java.lang.String id;
    /**
     * 姓名
     */
    @Excel(name = "姓名", width = 15)
    @ApiModelProperty(value = "姓名")
    private java.lang.String name;
    /**
     * 身份证
     */
    @Excel(name = "身份证", width = 15)
    @ApiModelProperty(value = "身份证")
    private java.lang.String idcard;
    /**
     * 手机
     */
    @Excel(name = "手机", width = 15)
    @ApiModelProperty(value = "手机")
    private java.lang.String phone;
    /**
     * 微信openid
     */
    @Excel(name = "微信openid", width = 15)
    @ApiModelProperty(value = "微信openid")
    private java.lang.String openid;
    /**
     * 微信unionid
     */
    @Excel(name = "微信unionid", width = 15)
    @ApiModelProperty(value = "微信unionid")
    private java.lang.String unionid;
    /**
     * 创建时间
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
    private java.util.Date createTime;
    /**
     * 更新时间
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新时间")
    private java.util.Date updateTime;
    /**
     * 状态
     */
    @Excel(name = "状态", width = 15, dicCode = "valid_status")
    @Dict(dicCode = "valid_status")
    @ApiModelProperty(value = "状态")
    private java.lang.String status;
    /**
     * 性别
     */
    @Excel(name = "性别", width = 15, dicCode = "nurse_sex")
    @Dict(dicCode = "nurse_sex")
    @ApiModelProperty(value = "性别")
    private java.lang.String sex;
    /**
     * 头像
     */
    @Excel(name = "头像", width = 15)
    @ApiModelProperty(value = "头像")
    private java.lang.String avatar;
    /**
     * 地区
     */
    @Excel(name = "地区", width = 15)
    @ApiModelProperty(value = "地区")
    private java.lang.String area;
    /**
     * 地区名称
     */
    @Excel(name = "地区名称", width = 15)
    @ApiModelProperty(value = "地区名称")
    private java.lang.String areaName;
    /**
     * 详细地址
     */
    @Excel(name = "详细地址", width = 15)
    @ApiModelProperty(value = "详细地址")
    private java.lang.String address;
    /**
     * 默认医院
     */
    @Excel(name = "默认医院", width = 15)
    @ApiModelProperty(value = "默认医院")
    private java.lang.String defaultHospital;
    /**
     * 默认医院名称
     */
    @Excel(name = "默认医院名称", width = 15)
    @ApiModelProperty(value = "默认医院名称")
    private java.lang.String defaultHospitalName;

    @Excel(name = "健康码id", width = 64)
    @ApiModelProperty(value = "健康码id")
    private java.lang.String vuid;

    @Excel(name = "是否手机验证", width = 15)
    @ApiModelProperty(value = "是否手机验证")
    private String isPhone;

    @Excel(name = "是否实名验证", width = 15)
    @ApiModelProperty(value = "是否实名验证")
    private String isVerify;

    @Excel(name = "端口0客户端1医护端", width = 15)
    @ApiModelProperty(value = "端口0客户端1医护端")
    private String port;

    @Excel(name = "用户等级", width = 15)
    @ApiModelProperty(value = "用户等级")
    private String level;


    @ExcelCollection(name = "用户监护人")
    @ApiModelProperty(value = "用户监护人")
    private List<NurseUserFamily> nurseUserFamilyList;

    @ExcelCollection(name = "用户地址")
    @ApiModelProperty(value = "用户地址")
    private List<NurseUserAddr> nurseUserAddrList;

    @ExcelCollection(name = "用户居家地址")
    @ApiModelProperty(value = "用户居家地址")
    private List<NurseHomeAddr> nurseHomeAddrList;

    @ExcelCollection(name = "用户优惠劵")
    @ApiModelProperty(value = "用户优惠劵")
    private List<NurseUserSpecial> nurseUserSpecialList;

    /**
     * 重写getNurseUserFamilyList，加入非空判断
     */
    public List<NurseUserFamily> getNurseUserFamilyList() {
        return nurseUserFamilyList != null ? nurseUserFamilyList : Collections.emptyList();
    }
}
